<?php
 
namespace models\entities;
use classes;
use Doctrine\ORM\Mapping as ORM; 
/**
 * @Entity(repositoryClass="models\repositories\BerkasRepository")
 * @Table(name="berkas")
 */
class Berkas {
 
/**
 * @Id
 * @Column(name="id", type="string", nullable=false)
 */
	protected $id;
	
/**
 * 
 * @ManyToOne(targetEntity="Perpustakaan")
 * @JoinColumn(name="perpustakaan_id", referencedColumnName="id")
 */
	protected $perpustakaan;
	
 /**
 * 
 * @ManyToOne(targetEntity="Indicator")
 * @JoinColumn(name="indicator_id", referencedColumnName="id")
 */
	protected $indicator;
	
/**
 * 
 * @ManyToOne(targetEntity="TipeBerkas")
 * @JoinColumn(name="tipe_berkas", referencedColumnName="id")
 */
	protected $tipe;	
 
 /**
 * 
 * 
 * @Column(name="reporter", type="string")
 */
	protected $reporter;
	
 /**
 * 
 * 
 * @Column(name="verifier", type="string")
 */
	protected $verifier;
	
 /**
 * 
 * 
 * @Column(name="approver", type="string")
 */
	protected $approver;	
	
/**
 * 
 * 
 * @Column(name="description", type="string")
 */
	protected $description;	

/**
 * 
 * 
 * @Column(name="attach", type="string")
 */
	protected $attach;	

	
/**
 * 
 * 
 * @Column(name="result", type="string")
 */
	protected $result;				
	
 /**
 * 
 * 
 * @Column(name="tanggal_event", type="datetime")
 */
	protected $eventDate;
	
/**
 * @ManyToMany(targetEntity="BerkasComment", mappedBy="berkas")
 * 
 */
    protected $comments;	
	
/**
 * 
 * 
 * @Column(name="mulai", type="datetime")
 */
	protected $startDate;
	
/**
 * 
 * 
 * @Column(name="selesai", type="datetime")
 */
	protected $endDate;	
		
/**
 * 
 * @OneToMany(targetEntity="Inbox", mappedBy="id")
 */		
	protected $inbox;
	
/**
 * 
 * @OneToMany(targetEntity="BerkasActivity", mappedBy="id")
 */		
	protected $activity;	
	
/**
 * 
 * 
 * @Column(name="updated_date", type="datetime")
 */
	protected $updateDate;	
		
	public function setId($id)
	{
	    $this->id = $id;
	}
 
	public function getId()
	{
	    return $this->id;
	}
	
	public function setTipe($tipe){
		$this->tipe = $tipe;
	}
	
	public function getTipe(){
		return $this->tipe;
	}

	public function setPerpustakaan($perpustakaan){
		$this->perpustakaan = $perpustakaan;
	}
	
	public function getPerpustakaan(){
		return $this->perpustakaan;
	}
	
	public function setReporter($reporter){
		$this->reporter = $reporter;
	}
	
	public function getReporter(){
		return $this->reporter;
	}
	
	public function setVerifier($verifier){
		$this->verifier = $verifier;
	}
	
	public function getVerifier(){
		return $this->verifier;
	}
	
	public function setApprover($approver){
		$this->approver = $approver;
	}
	
	public function getApprover(){
		return $this->approver;
	}
	
	public function setIndicator($indicator){
		$this->indicator = $indicator;
	}
	
	public function getIndicator(){
		return $this->indicator;
	}
	
	public function setComments($comments){
		$this->comments = $comments;
	}
	
	public function getComments(){
		return $this->comments;
	}
	
	public function setDescription($desc){
		$this->description = $desc;
	}
	
	public function getDescription(){
		return $this->description;
	}
	
	public function setEventDate($reportDate){
		$this->eventDate = $reportDate;
	}
	
	public function getEventDate(){
		return $this->eventDate;
	}
	
	public function setResult($result){
		$this->result = $result;
	}
	
	public function getResult(){
		return $this->result;
	}
	
	public function setStartDate($startDate){
		$this->startDate = $startDate;
	}
	
	public function getStartDate(){
		return $this->startDate;
	}
	
	public function setEndDate($endDate){
		$this->endDate = $endDate;
	}
	
	public function getEndDate(){
		return $this->endDate;
	}
	
	public function setInbox($inbox){
		$this->inbox = $inbox;
	}
	
	public function getInbox(){
		if (count($this->inbox) >0) {
			return $this->inbox[0];
		}
		return $this->inbox;
	}
	
	public function setUpdateDate($updateDate){
		$this->updateDate = $updateDate;
	}
	
	public function getUpdateDate(){
		return $this->updateDate;
	}
	
	public function setAttach($attach){
		$this->attach = $attach;
	}
	
	public function getAttach(){
		return $this->attach;
	}
	
	public function setActivity($act){
		$this->activity = $act;
	}
	
	public function getActivity(){
		return $this->activity;
	}
	
}